package com.dq.service.category;

import com.dq.exception.customException.AdminException;
import com.dq.controller.in.CategoryQuery;
import com.dq.vo.Vo;
import com.dq.domain.category.Category;

import java.util.List;

/**
 * @author heshuaijun
 * @date 2019/9/1715:19
 */
public interface CategoryService {
    public Category save(Category category);

    public Category update(Category updateCategory);

    /**
     * 获取所有直属 下级子分类集合
     * @param parentId
     * @return
     * @throws AdminException
     */
    public List<Category> getParCategory(Long parentId) throws AdminException;

    /**
     * 获取所有下级
     * @param parentId
     * @return
     * @throws AdminException
     */
    public List<Category> getParCategoryAll(Long parentId) throws AdminException;
    /**
     * 获取所有上级, 自身id
     * @param sonid
     * @return
     * @throws AdminException
     */
    public List<Category> getParCategoryList(Long sonid) throws AdminException;

    public Vo getCategoryTree(CategoryQuery categoryQuery) throws AdminException;

}
